package online.mjchow.fic.config;


import online.mjchow.fic.controller.interceptor.AdminIdInterceptor;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurerAdapter;

/**
 * Created by zhoumiaojie
 * Date       2017/7/7
 * Time       17:11
 */
@Configuration
public class CustomWebMvcConfigurerAdapter extends WebMvcConfigurerAdapter {

    @Override
    public void addInterceptors(InterceptorRegistry registry) {
        super.addInterceptors(registry);
        registry.addInterceptor(new AdminIdInterceptor()).addPathPatterns("/admin/**");
    }

}
